home *** CD-ROM | disk | FTP | other *** search
- ////////////////////////
- // ArrayEditor
- // by Charles Lloyd
- ////////////////////////
-
-
- //////////////////////////
- // User Settable Items
- //////////////////////////
- id array;
-
- id borderSize;
- id cellPadding;
- id cellSpacing;
- id fieldSize;
- id isEditable;
-
- //////////////////////
- // Internal State
- //////////////////////
- id arrayElement;
- id repetitionIndex;
- id entryCount;
-
- - awake
- {
- [self setArray:[NSMutableArray array]];
- borderSize = 1;
- cellPadding = 2;
- cellSpacing = 0;
- isEditable = NO;
- }
-
- - setArray:anArray
- {
- array = anArray;
- entryCount = [array count];
- }
-
- - arrayElement
- {
- return [array objectAtIndex:repetitionIndex];
- }
-
- - setArrayElement:aValue
- {
- arrayElement = aValue;
- [array replaceObjectAtIndex:repetitionIndex withObject:arrayElement];
- }
-